change attribute name

Hey,

How to change the name of an existing object attribute in a module?
Someones got a code snippet for me?

Regards,
Manuel
ManuelFelger - Fri Apr 09 08:50:17 EDT 2010

Re: change attribute name
Mathias Mamsch - Fri Apr 09 09:17:56 EDT 2010

This works for me. Regards, Mathias
 

AttrDef ad = find(current Module, "oldname")
modify(ad, setName, "newname")

Re: change attribute name
ManuelFelger - Fri Apr 09 09:22:22 EDT 2010

Mathias Mamsch - Fri Apr 09 09:17:56 EDT 2010

This works for me. Regards, Mathias
 

AttrDef ad = find(current Module, "oldname")
modify(ad, setName, "newname")

works fine, thank you Mathias!

Regards,
Manuel

Re: change attribute name
llandale - Fri Apr 09 13:37:45 EDT 2010

I believe you need to first get the column # of each View that displays the attribute; rename it; then go back into all those Views and re-insert the attribute. Try a rename with DXL and see if it changes views you are not looking at right now.

You will of course then need to find all DXL that reference the old attribute and update them as well. Good luck with that.

-Louie